<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
        <th><{$MOD.title}></th>
        <td align="right"><{link ctl="gz/gz:index" priv="hidden" class="button"}></td>
        <td width="15"></td>
      </tr>
    </table>
</div>
<div class="page-data"><form action="?gz/gz-edit.html" mini-form="gz-form" method="post" >
<input type="hidden" name="uid" value="<{$detail.uid}>"/>
<table width="100%" border="0" cellspacing="0" class="table-data form">
<tr>
    <th>会员名：</th>
    <td>
        <a ucard="@<{$detail.uid}>"><b class="blue"><{$detail.uname|default:'--'}>(UID:<{$detail.uid}>)</b></a> &nbsp;&nbsp;&nbsp;
        <{link ctl="member/member:edit" args=$detail.uid title="修改用户信息" class="button"}>
    </td>
</tr>    
<tr><th><span class="red">*</span>名称：</th><td><input type="text" name="data[name]" value="<{$detail.name|default:''}>" class="input w-300"/></td></tr>
<tr><th>等级：</th><td><select name="data[group_id]" class="w-150"><{widget id="member/group" from='gz' value=$detail.group_id}></select></td></tr>
<tr><th>QQ：</th><td><input type="text" name="data[qq]" value="<{$detail.qq|default:''}>" class="input w-300"/></td></tr>
<tr><th>手机：</th><td><input type="text" name="data[mobile]" value="<{$detail.mobile|default:''}>" class="input w-300"/></td></tr>
<tr><th>服务理念：</th><td><input type="text" name="data[slogan]" value="<{$detail.slogan}>" class="input w-300"/></td></tr>
<tr><th class="w-100"><span class="red">*</span>城市：</th><td><{widget id="data/region" city_id=$detail.city_id area_id=$detail.area_id}></td></tr>
<tr><th>统计：</th>
    <td>
        <label>浏览数:<input type="text" name="data[views]" value="<{$detail.views|default:'0'}>" class="input w-100"/></label>
        <label>案例数:<input type="text" name="data[case_num]" value="<{$detail.case_num|default:'0'}>" class="input w-100"/></label>
        <label>工地数:<input type="text" name="data[site_num]" value="<{$detail.site_num|default:'0'}>" class="input w-100"/></label>
        <label>预约数:<input type="text" name="data[yuyue_num]" value="<{$detail.yuyue_num|default:'0'}>" class="input w-100"/></label>       
    </td>
</tr>
<tr><th>评分：</th>
    <td>
        <label>评论数:<input type="text" name="data[comments]" value="<{$detail.comments|default:'0'}>" class="input w-100"/></label>
        <label>&nbsp;&nbsp;综合:<input type="text" name="data[score]" value="<{$detail.score|default:'0'}>" class="input w-100"/></label>
        <{foreach $CONFIG.score.gz as $k=>$v}>
        <label>&nbsp;&nbsp;<{$v}>:<input type="text" name="data[<{$k}>]" value="<{$detail[$k]|default:'0'}>" class="input w-100"/></label>
        <{/foreach}>
    </td>
</tr>
<{widget id="attr/form" from="zx:gz" value=$attr}>
<tr><th><span class="red">*</span>关于：</th><td><textarea name="data[about]" kindeditor="full" style="width:800px;height:350px;"><{$detail.about}></textarea></td></tr>
<tr><th>排序：</th><td><input type="text" name="data[orderby]" value="<{$detail.orderby|default:'50'}>" class="input w-100"/></td></tr>
<tr>
    <th>审核：</th>
    <td>
        <label><input type="radio" name="data[audit]" checked="checked" <{if $detail.audit}>checked="checked"<{/if}> value="1"/>发布</label>&nbsp;&nbsp;
        <label><input type="radio" name="data[audit]" <{if empty($detail.audit)}>checked="checked"<{/if}> value="0"/>待审</label>
    </td>
</tr>
<tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
</table>
</form></div>
<script type="text/javascript" src="<{$pager.res}>/kindeditor/kindeditor.js"></script>
<script type="text/javascript">
(function(K, $){
var editor = KindEditor.create('textarea[kindeditor]',{uploadJson : '?magic/upload-editor.html', extraFileUploadParams:{OATOKEN:"<{$OATOKEN}>"}});
})(window.KT, window.jQuery);
</script> <script type="text/javascript">
(function(K, $){
$("select[name='data[city_id]']").live('change', function(){
	var city_id = $(this).val();
	if(!city_id){return false;}
	$.getJSON("?data/area-city-"+city_id+".html", function(ret){
		if(ret.error){
			Widget.MsgBox.error(ret.message.join(","));
		}else if(ret.areas.length>0){
			var html = "";
			for(var i=0; i<ret.areas.length; i++){
				html += '<option value="'+ret.areas[i].area_id+'">'+ret.areas[i].area_name+'</option>';
			}
			$("select[name='data[area_id]']").html(html);		
		}else{
			$("select[name='data[area_id]']").html('<option value="">--</option>');
		}
	});
});
})(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>